#app {

  .main-container {
    height: 100%;
    transition: margin-left .28s;
    margin-left: $base-sidebar-width;
    position: relative;
  }

  .sidebarHide {
    margin-left: 0!important;
  }

  .sidebar-container {
    -webkit-transition: width .28s;
    transition: width 0.28s;
    width: $base-sidebar-width !important;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    height: 100%;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.1);

    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }

    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }

    .el-scrollbar {
      height: 100%;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 60px);
      }
    }

    .is-horizontal {
      display: none;
    }

    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }

    .svg-icon {
      margin-right: 16px;
      transition: all 0.3s ease;
    }

    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
      background: transparent;
      
      .el-menu-item, .el-submenu__title {
        color: rgba(255, 255, 255, 0.8);
        border-radius: 8px;
        margin: 4px 8px;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        
        &::before {
          content: '';
          position: absolute;
          left: 0;
          top: 0;
          width: 0;
          height: 100%;
          background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
          transition: width 0.3s ease;
        }
        
        &:hover {
          color: #ffffff;
          background: rgba(255, 255, 255, 0.1);
          transform: translateX(4px);
          
          &::before {
            width: 100%;
          }
          
          .svg-icon {
            transform: scale(1.1);
            color: #ffffff;
          }
        }
        
        &.is-active {
          color: #ffffff;
          background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
          box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
          
          .svg-icon {
            color: #ffffff;
          }
        }
      }
    }

    // menu hover
    .submenu-title-noDropdown,
    .el-submenu__title {
      &:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
      }
    }

    & .theme-dark .is-active > .el-submenu__title {
      color: #ffffff !important;
    }

    & .nest-menu .el-submenu>.el-submenu__title,
    & .el-submenu .el-menu-item {
      min-width: $base-sidebar-width !important;
      margin: 2px 16px;
      border-radius: 6px;

      &:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
        transform: translateX(2px);
      }
    }

    & .theme-dark .nest-menu .el-submenu>.el-submenu__title,
    & .theme-dark .el-submenu .el-menu-item {
      background-color: rgba(255, 255, 255, 0.05) !important;

      &:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
      }
    }

    &.theme-light {
      background: linear-gradient(180deg, #f5f6fa 0%, #f7f8fa 100%) !important;
      box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06);
      border-right: 1px solid #e6e8ec;

      .el-menu {
        background: transparent;
        
        .el-menu-item, .el-submenu__title {
          color: #333;
          background: transparent;
          border-radius: 10px;
          margin: 4px 10px;
          transition: all 0.3s cubic-bezier(.25,.8,.25,1);
          font-weight: 500;
          
          &:hover {
            background: linear-gradient(90deg, #e3e6f3 0%, #eaf0fb 100%);
            color: #5a6fd8;
            box-shadow: 0 2px 8px rgba(90, 111, 216, 0.08);
            transform: translateX(4px);
          }
          
          &.is-active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.10);
          }
        }
        
        .svg-icon {
          color: #888;
          transition: all 0.3s;
        }
        .el-menu-item.is-active .svg-icon,
        .el-submenu__title.is-active .svg-icon {
          color: #fff;
        }
      }
    }
  }

  // 浅色主题下Logo区
  .sidebar-container.theme-light .sidebar-logo-container {
    background: linear-gradient(90deg, #f5f6fa 0%, #eaf0fb 100%) !important;
    border-bottom: 1px solid #e6e8ec;
    box-shadow: 0 2px 8px rgba(90, 111, 216, 0.04);
    
    .sidebar-title {
      color: #333 !important;
      text-shadow: none;
    }
    .sidebar-logo {
      background: #fff;
      border: 1px solid #e6e8ec;
    }
  }

  .hideSidebar {
    .sidebar-container {
      width: 64px !important;
    }

    .main-container {
      margin-left: 64px;
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;

      .el-tooltip {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }
      }
    }

    .el-submenu {
      overflow: hidden;

      &>.el-submenu__title {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

      }
    }

    .el-menu--collapse {
      .el-submenu {
        &>.el-submenu__title {
          &>span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $base-sidebar-width !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform .28s;
      width: $base-sidebar-width !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$base-sidebar-width, 0, 0);
      }
    }
  }

  .withoutAnimation {

    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  &>.el-menu {
    .svg-icon {
      margin-right: 16px;
    }
  }
}
